<?php
require __DIR__ . '/vendor/autoload.php';

use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ServerException;

try {
    // Create Client
    AlibabaCloud::accessKeyClient('foo', 'bar')->regionId('cn-hangzhou')->asDefaultClient();
    // Chain calls and send RPC request
    $result = AlibabaCloud::cdn()
                          ->v20141111()
                          ->describeCdnService()
                          ->request();
} catch (ServerException $exception) {
    // Get server error message
    print_r($exception->getErrorMessage());
}